package stsj.meddroid.elements;

import com.badlogic.gdx.graphics.g2d.Sprite;

public class Organ {
	protected int state;
	protected int health;
	protected Sprite organSprite;
	public int x;
	public int y;
	protected int type;
	
	public static final int KIDNEY = 0;
	public static final int LUNG = 1;
	public static final int LIVER = 2;
	public static final int BRAIN = 3;
	
	public Organ(int x, int y, Sprite s, int t) {
		this.x = x;
		this.y = y;
		this.organSprite = s;
		this.type = t;
		this.organSprite.setPosition(x, y);
		if (type == KIDNEY){organSprite.setSize(80, 120);}
		else if(type == LUNG){organSprite.setSize(380, 450);}
		else if(type == LIVER){organSprite.setSize(200, 200);}
		else if(type == BRAIN){organSprite.setSize(380, 220);}
	}
	
	public void moveDown(int i){
		y = y - i; 
		organSprite.setPosition(x, y);
	}
	
	public void moveUp(int i){
		y = y + i;
		organSprite.setPosition(x, y);
	}
	
	public void moveLeft(int i){
		x = x - i;
		organSprite.setPosition(x, y);
	}
	
	public void moveRight(int i){
		x = x + i;
		organSprite.setPosition(x, y);
	}
	
	public void setState(int x) {
		state = x;
	}

	public void setHealth(int x) {
		health = x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public void setY(int x) {
		y = x;
	}

	public void setSprite(Sprite x) {
		organSprite = x;
	}	
	
	public int getState() {
		return state;
	}

	public int getHealth() {
		return health;
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	public Sprite getSprite() {
		return organSprite;
	}
}
